﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Grishko.SerilizeTools;


namespace Grishko.DataTier
{
   public  class TestEntity : EntitySingle, ISqlSignature
    {
       [SrchItemInfo(TxtPropertyName = "Детишка1")]       
       public TestChild Child1 { get; set; }
       
       [SrchItemInfo(TxtPropertyName = "Наименование")]       
       public string Name { get; set; }

       #region ISqlSignature Members

       public virtual string SaveProcedure
       {
           get { return "SaveEntity"; }
       }

       public virtual string DeleteProcedure
       {
           get { return ""; }
       }

       public virtual string LoadProcedure
       {
           get { return "LoadEntity"; }
       }

       #endregion
       public string AgencyID 
        {
           get { return "1"; } 
        }
    }

   public class TestChild : EntitySingle
   {
       [SrchItemInfo(TxtPropertyName = "Наименование", PropControlType = SrchItemInfo.PropertyControlType.Text)]       
       public string Name { get; set; }
       
       [SrchItemInfo(TxtPropertyName = "Наименование")]       
       public TestChild Child { get; set; }

   }
}
